<?php
Yii::app()->clientScript->registerScript('search',
        "$('form#search_rekdinas').submit(function()
            {
                $.fn.yiiGridView.update('rekDinas-grid',{
                data:$(this).seriallize()
                });
                return false;
            });
        ");
?>

<h1>Data Rekening Dinas</h1>

<?php $this->renderPartial('_search',array('model'=>$model,));?>
<?php $this->widget('bootstrap.widgets.TBGridView', array(
	'id'=>'rekDinas-grid',
	'dataProvider'=>$model->search(),
	'type' => 'striped bordered condensed',
	'columns'=>array(
           array(
               'header'=>'Nomor Rekening',
                         'name'=>'no_rek',
           ),
           array(
               'header'=>'Nama Bank',
                         'name'=>'nama_bank',
           ),
           array(
               'header'=>'Nama Cabang',
                         'name'=>'cabang',
           ),	
           array(
		'class' => 'bootstrap.widgets.TbButtonColumn',
		'template' => '{update} ',
		'buttons' => array(
                                   'update' => array(
                                               'url' => 'Yii::app()->createUrl("MasterFile/RekDinas/update", array("id"=>$data->no_rek))',
                                            ),
				),
				'htmlOptions' => array('style' => 'width: 8%;text-align: center;'),
		),
            array(
		'class' => 'bootstrap.widgets.TbButtonColumn',
		'template' => '{delete} ',
		'buttons' => array(
				'delete' => array(
						'url' => 'Yii::app()->createUrl("MasterFile/RekDinas/delete", array("id"=>$data->no_rek))',
                                            ),
				),
				'htmlOptions' => array('style' => 'width: 8%;text-align: center;'),
			)
        )        
    )); 
?>

<?php
     $this->widget('bootstrap.widgets.TbButton', array(
                
                'type' => 'success',
				'icon' => 'icon-plus-sign',
                                'label' => 'Tambah Rekening',
                                'url'=>  Yii::app()->createUrl('/MasterFile/RekDinas/create'),
                                'htmlOptions'=>array('style'=>'margin-top:20px'),
     ));
?>